import sys
sys.path.insert(0, 'tweepy.zip')

from handler.signup_handler import SignupPage
from handler.oauth_callback_handler import CallbackPage
from handler.poller_handler import PollerPage
from task.poller_task import PollerTask

from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app

application = webapp.WSGIApplication([
        (r'/oauth/', SignupPage),
        (r'/oauth/callback', CallbackPage),
        (r'/poller', PollerPage),
        (r'/task/poller', PollerTask),
        (r'/.*$', SignupPage),
], debug=True)

def main():
    run_wsgi_app(application)

# Run the WSGI application
if __name__ == '__main__':
    main()
